package org.bwgl.demo5.controller;

import org.bwgl.demo5.pojo.Student;
import org.springframework.web.bind.annotation.*;

@RestController
public class MyHello2 {
    @GetMapping(value = "test2")
    public String test2(){
        return "test2";
    }
    @GetMapping(value = "test3")
    public String test3(String name){
        return name;
    }
    @GetMapping(value = "test4")
    public String test4(@RequestParam("username")String name){
        return name;
    }
    @GetMapping(value = "test5")
    public String test5(String username,int age){
        return username+age;
    }
    @GetMapping(value = "test6")
    public String test6(Student s){
        return s.toString();
    }
    @GetMapping(value = "test7")
    public String test7(@RequestBody Student s){
        return s.toString();
    }
}
